package com.hm.hsw1;

public class Manager extends Employee {
    private Clerk clerk;
    public Manager() {
    }

    public Manager(String name, String workId, String dept, Clerk clerk) {
        super(name, workId, dept);
        this.clerk = clerk;
    }

    public Manager(String name) {
        super(name);
    }

    @Override
    public void showMsg() {
        System.out.println(getName()+getDept()+getWorkId()+getClerk().getName());
    }

    public Clerk getClerk() {
        return clerk;
    }

    public void setClerk(Clerk clerk) {
        this.clerk = clerk;
    }

    @Override
    public String toString() {
        return "Manager{" +
                "clerk=" + clerk.getName() +
                '}';
    }
}
